// custom-tab-bar/index.js
Component({

  /**
   * 页面的初始数据
   */
  data: {
    active: 6,
    list: [
      "/pages/index/index",
      "/pages/consultation/consultation",
      "/pages/qrcode/qrcode",
      "/pages/mall/mall",
      "/pages/person/person"
    ]
  },

  methods: {
    onChange(e) {
      const url = this.data.list[e.detail]
      console.log(url);
      wx.switchTab({ url })
      this.setData({
        active: e.detail
      })
    }
  }
})